namespace ProduceBasicData.Api.DTO
{
    /// <summary>
    /// 出货订单数据DTO类
    /// </summary>
    public class OutboundOrderDataDto
    {
        /// <summary>
        /// 序号
        /// </summary>
        public int SerialNumber { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        public string CustomerName { get; set; } = string.Empty;

        /// <summary>
        /// 同比变化百分比
        /// </summary>
        public decimal YearOverYearChange { get; set; }

        /// <summary>
        /// 同比变化显示文本
        /// </summary>
        public string YearOverYearDisplay { get; set; } = string.Empty;

        /// <summary>
        /// 同比变化颜色
        /// </summary>
        public string YearOverYearColor { get; set; } = string.Empty;

        /// <summary>
        /// 订单数量
        /// </summary>
        public int OrderQuantity { get; set; }

        /// <summary>
        /// 客户ID
        /// </summary>
        public int CustomerId { get; set; }

        /// <summary>
        /// 当前期间订单数量
        /// </summary>
        public int CurrentPeriodQuantity { get; set; }

        /// <summary>
        /// 去年同期订单数量
        /// </summary>
        public int LastYearPeriodQuantity { get; set; }
    }

    /// <summary>
    /// 出货订单数据图表DTO类
    /// </summary>
    public class OutboundOrderChartDto
    {
        /// <summary>
        /// 出货订单数据列表
        /// </summary>
        public List<OutboundOrderDataDto> OrderData { get; set; } = new List<OutboundOrderDataDto>();

        /// <summary>
        /// 统计信息
        /// </summary>
        public OutboundOrderStatistics Statistics { get; set; } = new OutboundOrderStatistics();

        /// <summary>
        /// 图表数据（用于ECharts）
        /// </summary>
        public OutboundOrderChartData ChartData { get; set; } = new OutboundOrderChartData();
    }

    /// <summary>
    /// 出货订单统计信息
    /// </summary>
    public class OutboundOrderStatistics
    {
        /// <summary>
        /// 总客户数
        /// </summary>
        public int TotalCustomers { get; set; }

        /// <summary>
        /// 总订单数量
        /// </summary>
        public int TotalOrderQuantity { get; set; }

        /// <summary>
        /// 平均订单数量
        /// </summary>
        public decimal AverageOrderQuantity { get; set; }

        /// <summary>
        /// 最大订单数量
        /// </summary>
        public int MaxOrderQuantity { get; set; }

        /// <summary>
        /// 最小订单数量
        /// </summary>
        public int MinOrderQuantity { get; set; }

        /// <summary>
        /// 同比增长的客户数
        /// </summary>
        public int GrowingCustomers { get; set; }

        /// <summary>
        /// 同比下降的客户数
        /// </summary>
        public int DecliningCustomers { get; set; }

        /// <summary>
        /// 无变化的客户数
        /// </summary>
        public int UnchangedCustomers { get; set; }
    }

    /// <summary>
    /// 出货订单图表数据
    /// </summary>
    public class OutboundOrderChartData
    {
        /// <summary>
        /// 客户名称列表（用于X轴）
        /// </summary>
        public List<string> CustomerNames { get; set; } = new List<string>();

        /// <summary>
        /// 订单数量列表（用于Y轴）
        /// </summary>
        public List<int> OrderQuantities { get; set; } = new List<int>();

        /// <summary>
        /// 同比变化列表（用于颜色区分）
        /// </summary>
        public List<decimal> YearOverYearChanges { get; set; } = new List<decimal>();

        /// <summary>
        /// 同比变化颜色列表
        /// </summary>
        public List<string> YearOverYearColors { get; set; } = new List<string>();
    }
}





